﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Default.master" CodeFile="StoredProcedures.aspx.cs" Inherits="StoredProcedures" Title="<%$Resources:web.sitemap, StoredProcedures.Title %>"%>
<%@ Register TagPrefix="Toolbar" TagName="HelpLogout" Src="~/Toolbars/HelpLogoutToolbar.ascx" %>
<%@ Register TagPrefix="Location" TagName="Server" Src="~/Toolbars/ServerLocation.ascx" %>
<%@ Register TagPrefix="Location" TagName="Database" Src="~/Toolbars/DatabaseLocation.ascx" %>
<asp:Content runat="server" ContentPlaceHolderID="breadcrumb">
	<Location:Server Runat="Server" id="ServerLocation"></Location:Server>
	<Location:Database Runat="Server" id="DatabaseLocation" IsActive="true"></Location:Database>

</asp:Content>
<asp:Content runat="server" ContentPlaceHolderID="NavigationPane">
</asp:Content>
<asp:Content runat="server" ContentPlaceHolderID="ContentPane">
    <div class="RightCenterWell">
        <table width="100%">
            <tr>
                <td valign="top">
                    <asp:Image ID="icon_tables_32" SkinID="icon_tables_32" runat="Server" />
                </td>
                <td>
                    <span class="header3"><%= Request.QueryString["database"] %>: <asp:Literal ID="Literal1" Text="<%$Resources:LocalizedText,StoredProcedures_Header %>" runat=server /></span>
                    <hr />
                    <p>
                    <asp:Literal ID="Literal2" Text="<%$Resources:LocalizedText,StoredProcedures_Instructions %>" runat=server /></p>
                    <br />
                    <br />
                    <hr />
                     <asp:Literal ID="Literal3" Text="<%$Resources:LocalizedText,StoredProcedures_Filter %>" runat=server /><br />
                    <asp:DropDownList width="200" AutoPostBack="true" OnSelectedIndexChanged="ddlFilter_SelectedIndexChanged" ID="ddlFilter" runat="Server">
                        <asp:ListItem id="liShowUser" Selected="true" Text="<%$Resources:LocalizedText,StoredProcedures_FilterOptionUser %>"> </asp:ListItem>
                        <asp:ListItem id="liShowSystem" Text="<%$Resources:LocalizedText,StoredProcedures_FilterOptionSystem %>"> </asp:ListItem>
                    </asp:DropDownList>
                    <asp:Label ID="Label1" Runat="server" ForeColor="red" Visible="False"></asp:Label>
                    </p>
                    <div class="TableGrid">
					    <asp:datagrid id="dgStoredProcedures" runat="server" GridLines="None" Border="0" AutoGenerateColumns="False" Width="97%" CellPadding="4" CellSpacing="1" Visible="False">
						    <Columns>
							    <asp:TemplateColumn HeaderText="Name"><ItemTemplate>
									    <asp:HyperLink id="Hyperlink1" runat="server" text='<%# "&amp;nbsp;" + DataBinder.Eval(Container.DataItem, "Name") %>' cssclass="databaseListBlack" NavigateUrl='<%# String.Format("EditStoredProcedure.aspx?database={0}&storedprocedure={1}&schema={2}", Server.UrlEncode(Request.QueryString["database"]), DataBinder.Eval(Container.DataItem, "Name"), DataBinder.Eval(Container.DataItem, "Schema")) %>'></asp:HyperLink>

								    </ItemTemplate>
								    <HeaderStyle Wrap="False"></HeaderStyle>

								    <ItemStyle Wrap="False"></ItemStyle>
							    </asp:TemplateColumn>
							    <asp:BoundColumn DataField="Schema" HeaderText="<%$Resources:LocalizedText,StoredProcedures_Schema %>" DataFormatString="{0}">
								    <HeaderStyle Wrap="False"></HeaderStyle>

								    <ItemStyle Wrap="False"></ItemStyle>
							    </asp:BoundColumn>
							     <asp:BoundColumn DataField="CreateDate" HeaderText="<%$Resources:LocalizedText,StoredProcedures_CreateDate %>" DataFormatString="{0}">
								    <HeaderStyle Wrap="False"></HeaderStyle>

								    <ItemStyle Wrap="False"></ItemStyle>
							    </asp:BoundColumn>
							    <asp:TemplateColumn HeaderText="Edit"><ItemTemplate>
									    <asp:HyperLink id="EditSProc" runat="server" text="<%$Resources:LocalizedText,StoredProcedures_Edit %>" cssclass="databaseListAction" NavigateUrl='<%# String.Format("EditStoredProcedure.aspx?database={0}&storedprocedure={1}&schema={2}", Server.UrlEncode(Request.QueryString["database"]), DataBinder.Eval(Container.DataItem, "Name"), DataBinder.Eval(Container.DataItem, "Schema")) %>'></asp:HyperLink>

								    </ItemTemplate>
								    <HeaderStyle Wrap="False" HorizontalAlign="Right"></HeaderStyle>

								    <ItemStyle Wrap="False" HorizontalAlign="Right"></ItemStyle>
							    </asp:TemplateColumn>
							    <asp:TemplateColumn HeaderText="Delete"><ItemTemplate>
									    <asp:HyperLink id="DeleteSProc" runat="server" text="<%$Resources:LocalizedText,StoredProcedures_Delete %>" cssclass="databaseListAction" NavigateUrl='<%# String.Format("DeleteStoredProcedure.aspx?database={0}&storedprocedure={1}&schema={2}", Server.UrlEncode(Request.QueryString["database"]), DataBinder.Eval(Container.DataItem, "Name"), DataBinder.Eval(Container.DataItem, "Schema")) %>'></asp:HyperLink>

								    </ItemTemplate>
								    <HeaderStyle Wrap="False" HorizontalAlign="Right"></HeaderStyle>

								    <ItemStyle Wrap="False" HorizontalAlign="Right"></ItemStyle>
							    </asp:TemplateColumn>
						    </Columns>
						    <ItemStyle CssClass="TableItem"></ItemStyle>
						    <AlternatingItemStyle CssClass="AlternateTableItem" />

						    <HeaderStyle CssClass="TableHeader"></HeaderStyle>
					    </asp:datagrid>
					    <asp:label id="lblNoStoredProcedures" runat="server" EnableViewState="False" Font-Bold="true" Font-Size="10" Visible="False" Text="<%$Resources:LocalizedText,StoredProcedures_Delete %>"></asp:label>&nbsp;
					    <asp:Label id="lblError" runat="server" Visible="False" ForeColor="red"></asp:Label>
                    </div>
                    <br />
                    <table width="100%" cellspacing="0" cellpadding="0" border="0">
                        <tr>
                            <td align="left">
						        <asp:Button ID="btnAddNewStoredProcedure" Text="<%$Resources:LocalizedText,StoredProcedures_NewProcedure %>" OnClick="btnAddNewStoredProcedure_Click" runat="Server" />
                            </td>
                        </tr>
                    </table>					

					
</asp:Content>

